<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>将 JPEG 图像文件转换为 WBMP 图像文件</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.iptcparse.html">« iptcparse</a></li>
      <li style="float: right;"><a href="function.png2wbmp.html">png2wbmp »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.image.html">GD 和图像处理 函数</a></li>
    <li>将 JPEG 图像文件转换为 WBMP 图像文件</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.jpeg2wbmp" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">jpeg2wbmp</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">jpeg2wbmp</span> &mdash; <span class="dc-title">将 JPEG 图像文件转换为 WBMP 图像文件</span></p>

   </div>
 <div class="refsect1 description" id="refsect1-function.jpeg2wbmp-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>jpeg2wbmp</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$jpegname</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">string</span> <code class="parameter">$wbmpname</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$dest_height</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$dest_width</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">int</span> <code class="parameter">$threshold</code></span><br>): <span class="type">bool</span></div>

    <p class="para rdfs-comment">
   将 JPEG 图像文件转换为 WBMP 图像文件。
  </p>
   </div>

 <div class="refsect1 parameters" id="refsect1-function.jpeg2wbmp-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">jpegname</code></dt>

     <dd>

      <p class="para">
       JPEG 文件的路径。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">wbmpname</code></dt>

     <dd>

      <p class="para">
       目标 WBMP 文件的路径。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">dest_height</code></dt>

     <dd>

      <p class="para">
       目标图像高度。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">dest_width</code></dt>

     <dd>

      <p class="para">
       目标图像宽度。
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">threshold</code></dt>

     <dd>

      <p class="para">
       阈值，在 0 和 8 之间（含）。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.jpeg2wbmp-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>， 或者在失败时返回 <strong><code>false</code></strong>。
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.jpeg2wbmp-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2719">
    <p><strong>示例 #1 <span class="function"><strong>jpeg2wbmp()</strong></span> 例子</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;目标&nbsp;jpeg&nbsp;的路径<br /></span><span style="color: #0000BB">$path&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'./test.jpg'</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;获取图像尺寸<br /></span><span style="color: #0000BB">$image&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">getimagesize</span><span style="color: #007700">(</span><span style="color: #0000BB">$path</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;转换图像<br /></span><span style="color: #0000BB">jpeg2wbmp</span><span style="color: #007700">(</span><span style="color: #0000BB">$path</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'./test.wbmp'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$image</span><span style="color: #007700">[</span><span style="color: #0000BB">1</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">$image</span><span style="color: #007700">[</span><span style="color: #0000BB">0</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>

 <div class="refsect1 notes" id="refsect1-function.jpeg2wbmp-notes">
  <h3 class="title">注释</h3>
  
  
 </div>

 <div class="refsect1 seealso" id="refsect1-function.jpeg2wbmp-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.png2wbmp.html" class="function" rel="rdfs-seeAlso">png2wbmp()</a> - 将 PNG 图像文件转换为 WBMP 图像文件</span></li>
   </ul>
  </p>
 </div>

  </div></div></div></body></html>